#!/bin/sh
echo "generating result overviews"
cd "`dirname "$0"`"
source ./settings.sh

rm "$statusoverview_tmpfile"

#unit tests
echo "generating unit tests overview"
cd "$cvs_qa_pear_ci"
php\
 examples/genUnitTestResults.php\
 $statusoverview_tmpfile\
 $log_unittests\
 > $unittest_reportdir/overview.htm

#phpcs
echo "generating coding standards overview"
cd "$cvs_qa_pear_ci"
php -c /etc/php5/cli/php-xdebug.ini\
 examples/genCodingStandardResults.php\
 $statusoverview_tmpfile\
 $tmp_phpcs\
 $www_phpcs

echo "collecting doc coverage status"
cd "$doccoverage"
php\
 -d include_path=".:/data/cvs/instpear/:$cvs_qa_pear_ci/"\
 "$coverage_examples/genStatusOverview.php"\
 "$cvs_peardoc/manual.xml"\
 "$cvs_pear/"\
 "$statusoverview_tmpfile"


echo "generating full overview"
cd "$cvs_qa_pear_ci"
php -c /etc/php5/cli/php-xdebug.ini\
 examples/renderOverview.php\
 "$statusoverview_tmpfile"\
 > "$www/overview.htm"

echo "logging status overview in database"
cd "$cvs_qa_pear_ci"
php -c /etc/php5/cli/php-xdebug.ini\
 examples/logOverviewDb.php\
 "$statusoverview_tmpfile"\
 "mysql://pearqa:KuhAh@localhost/pear_qa"
 "statusoverview"
